package com.it.emall.service.impl;

import com.it.emall.domain.Ingredients;
import com.it.emall.mapper.IngredientsMapper;
import com.it.emall.service.IngredientsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IngredientsServiceImpl implements IngredientsService {

    @Autowired
    private IngredientsMapper ingredientsMapper;



    @Override
    public List<Ingredients> selectIngredientsList() {
        return ingredientsMapper.selectIngredientsList();
    }

    @Override
    public List<Ingredients> selectChildrenIngreByPid(Integer pid) {
        return ingredientsMapper.selectChildrenIngredientsByPid(pid);
    }

    @Override
    public int insertIngredients(Ingredients ingredients) {
        return ingredientsMapper.insertIngredients(ingredients);
    }

    @Override
    public int updateIngredients(Ingredients ingredients) {
        return ingredientsMapper.updateIngredients(ingredients);
    }

    @Override
    public int deleteIngredients(Integer id) {
        return ingredientsMapper.deleteIngredients(id);
    }

    @Override
    public Ingredients selectIngredientsById(Integer id) {
        return ingredientsMapper.selectIngredientsById(id);
    }
}
